package com.zretc.service.impl;

import com.zretc.dao.MovieDetailsMapper;
import com.zretc.service.MovieDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

@Service
public class MovieDetailsServiceImpl implements MovieDetailsService {
    @Autowired
    private MovieDetailsMapper movieDetailsMapper;

    @Override
    public Map<String, Object> getMovieDetailsByMovieId(String movieId) {
        List<String> actorList = movieDetailsMapper.findActorByRelationId(movieId);
        Map<String, Object> movieMap = movieDetailsMapper.findMovieDetailsByMovieId(movieId);
        movieMap.put("actorNameList",actorList);
        return movieMap;
    }

    @Override
    public List<Map<String, String>> getCinemaByMovieId(String movieId) {
        return movieDetailsMapper.findCinemaByMovieId(movieId);
    }

    @Override
    public List<Map<String, Object>> getMovieMessageForSelectSeat(Map<String, String> params) {
        return movieDetailsMapper.findMovieMessageForSelectSeat(params);
    }
}
